; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x/NT ; Author: Rick G ; ; Script Function: ; Set up Sharing for mount point, also check properties (NO indexing) ; ; I copied this code from one of the examples in the AutoIt help file #include GUICreate(" Drag file name to input area", 320,120, @DesktopWidth/2+160, @DesktopHeight/2-145, -1, 0x00000018); WS_EX_ACCEPTFILES $file = GUICtrlCreateInput ( "", 10, 5, 300, 20) GUICtrlSetState(-1,$GUI_ACCEPTFILES) $btn = GUICtrlCreateButton ("Ok", 40, 75, 60, 20) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn exitloop EndSelect Wend ; end of copied code $file2 = StringMid(GUICtrlRead($file),4,99) ; Get rid of input box GUIDelete() ; Use AutoItSetOption to slow down the typing speed so we can see it :) sleep(200) AutoItSetOption("SendKeyDelay", 50) ; Trigger context menu via Shift-F10 Send("+{F10}") ; H for Sharing Send("h") WinWaitActive($file2 & " Properties","You can share this folder with other users on your network.") ; Alt-S for Sharing Send("!s") ;MsgBox (4096, "file2", "[" & $file2 & "]") ; Alt-P for Permissions Send("!p") WinWaitActive("Permissions for " & $file2,"Permissions for:") ; Alt-R to remove default Permissions Send("!r") ; Alt-D to add Permissions Send("!d") WinWaitActive("Select Users or Groups","Enter the object names to select") ; Add Administrators group Send("administrators") Send("{ENTER}") ; Send 2 tabs, then space, then Enter Send("{TAB}") Send("{TAB}") Send(" ") Send("{ENTER}") ; Now Enter should close Sharing Window Send("{ENTER}") ; Trigger context menu via Shift-F10 sleep(200) Send("+{F10}") ; Send R for properties Send("r") WinWaitActive($file2 & " Properties") ; Alt-D for advanced properties Send("!d") ; Tell what to do next $answer = MsgBox(0, "Indexing?", "You want to turn the indexing OFF")